@mixin ContainerSize($width, $height) {
  width: $width;
  height: $height;
}

@mixin flower($w, $h, $bg) {
  width: $w;
  height: $h;
  background-color: $bg;
  opacity: 0.8;
  border-radius: 0 $w 0 $w;
  transform: rotate(45deg);
  transform-origin: bottom right;
  position: absolute;
  transition: all 4s ease-in-out;
  box-shadow:
    0 0 5px rgba(231, 156, 156, 0.05),
    0 -1px 3px rgba(231, 156, 156, 0.2),
    0 9px 9px rgba(231, 156, 156, 0.3),
    0 12px 12px rgba(231, 156, 156, 0.3),
    0 15px 15px rgba(231, 156, 156, 0.3);
}

@mixin xuan($deg) {
  transform: rotate($deg);
  transition: all 3s ease-in;
}

* {
  margin: 0;
  padding: 0;
}

:root {
  background-color: snow;
}

.container {
  @include ContainerSize(300px, 300px);
  margin: 200px 500px;
  position: relative;

  .hua:nth-child(1) {
    @include flower(300px, 300px, red);
    background-image: url(./images/01.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: -70px 0;
  }

  .hua:nth-child(2) {
    @include flower(300px, 300px, orange);
    background-image: url(./images/02.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: -70px 0;
  }

  .hua:nth-child(3) {
    @include flower(300px, 300px, yellow);
    background-image: url(./images/04.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: -70px 0;
  }

  .hua:nth-child(4) {
    @include flower(300px, 300px, green);
    background-image: url(./images/06.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: -70px 0;
  }

  .hua:nth-child(5) {
    @include flower(300px, 300px, skyblue);
    background-image: url(./images/09.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: -70px 0;
  }

  .hua:nth-child(6) {
    @include flower(300px, 300px, blue);
    background-image: url(./images/10.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 -30px;
  }

  .hua:nth-child(7) {
    @include flower(300px, 300px, purple);
    background-image: url(./images/03.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
  }

  &:hover .hua:nth-child(2) {
    @include xuan(20deg)
  }

  &:hover .hua:nth-child(3) {
    @include xuan(-5deg)
  }

  &:hover .hua:nth-child(4) {
    @include xuan(-30deg)
  }

  &:hover .hua:nth-child(5) {
    @include xuan(70deg)
  }

  &:hover .hua:nth-child(6) {
    @include xuan(95deg)
  }

  &:hover .hua:nth-child(7) {
    @include xuan(120deg)
  }
}